package com.wzy.pipeline2.model;

import lombok.Data;

/**
 * @Auther: wzy
 * @Date: 2021/12/11/16:41
 * @Description:
 */
@Data
public class FlowResult<T> {
    private Integer code;
    private String massage;
    private T data;

    public static FlowResult ok() {
        FlowResult flowResult = new FlowResult();
        flowResult.setCode(200);
        return flowResult;
    }

    public static FlowResult fail(String s) {
        FlowResult flowResult = new FlowResult();
        flowResult.setCode(400);
        flowResult.setMassage(s);
        return flowResult;
    }
}
